# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=gnome-color-manager
pkgver=3.36.0
pkgrel=1
pkgdesc="GNOME Color Profile Tools"
url="https://gitlab.gnome.org/GNOME/gnome-color-manager"
arch=(x86_64)
license=(GPL2)
depends=(shared-color-targets colord gtk3 lcms2)
makedepends=(yelp-tools git appstream-glib meson docbook-utils docbook-sgml perl-sgmls)
checkdepends=(xorg-server-xvfb)
groups=(gnome)
_commit=3d5e99986d95842075013ddb9c622451f48cf252  # tags/GNOME_COLOR_MANAGER_3_36_0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-color-manager.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^GNOME_COLOR_MANAGER_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

check() {
  dbus-run-session xvfb-run \
    -s '-screen 0 1920x1080x24 -nolisten local' \
    meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}

# vim:set sw=2 et:
